home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Tools / Packer / xad / Developer / Include / ASM / libraries / xadmaster.i
Text File  |  1999-11-06  |  16KB  |  410 lines

  1.     IFND    LIBRARIES_XADMASTER_I
  2. LIBRARIES_XADMASTER_I    SET    1
  3.  
  4. *
  5. *    $VER: xadmaster.i 1.1 (18.11.1998)
  6. *    xadmaster.library defines and structures
  7. *
  8. *    Copyright © 1998 by Dirk Stöcker
  9. *    All Rights Reserved.
  10. *
  11.  
  12.     IFND    EXEC_LIBRARIES_I
  13.     INCLUDE    "exec/libraries.i"
  14.     ENDC
  15.  
  16.     IFND    UTILITY_TAGITEM_I
  17.     INCLUDE    "utility/tagitem.i"
  18.     ENDC
  19.  
  20. * NOTE: The structures do not have size labels, as they have no fixed
  21. * size. You always need to call xadAllocObject to get them
  22.  
  23. *************************************************************************
  24. *                                                *
  25. *    library base structure                        *
  26. *                                                *
  27. *************************************************************************
  28.  
  29.     STRUCTURE xadMasterBase,LIB_SIZE
  30.     APTR    xmb_SysBase
  31.     APTR    xmb_DOSBase
  32.     APTR    xmb_UtilityBase
  33.     ULONG    xmb_RecogSize        * read only
  34.  
  35. *************************************************************************
  36. *                                                *
  37. *    tag-function call flags                               *
  38. *                                                *
  39. *************************************************************************
  40.  
  41. * input tags for xadGetInfo, only one can be specified per call
  42. XAD_INSIZE        EQU    (TAG_USER+001) * input data size
  43. XAD_INFILENAME        EQU    (TAG_USER+002)
  44. XAD_INFILEHANDLE    EQU    (TAG_USER+003)
  45. XAD_INMEMORY        EQU    (TAG_USER+004)
  46. XAD_INHOOK        EQU    (TAG_USER+005)
  47.  
  48. * output tags, only one can be specified per call, xadXXXXUnArc
  49. XAD_OUTSIZE        EQU    (TAG_USER+010) * output data size
  50. XAD_OUTFILENAME        EQU    (TAG_USER+011)
  51. XAD_OUTFILEHANDLE    EQU    (TAG_USER+012)
  52. XAD_OUTMEMORY        EQU    (TAG_USER+013)
  53. XAD_OUTHOOK        EQU    (TAG_USER+014)
  54. XAD_OUTDEVICE        EQU    (TAG_USER+015) * for disk archives only
  55.  
  56. * object allocation tags for xadAllocObjectA
  57. XAD_OBJNAMESIZE        EQU    (TAG_USER+020) * XADOBJ_FILEINFO, size of needed name space
  58. XAD_OBJCOMMENTSIZE    EQU    (TAG_USER+021) * XADOBJ_FILEINFO, size of needed comment space
  59. XAD_OBJPRIVINFOSIZE    EQU    (TAG_USER+022) * XADOBJ_FILEINFO & XADOBJ_DISKINOF, self use size
  60. XAD_OBJBLOCKENTRIES    EQU    (TAG_USER+023) * XADOBJ_DISKINFO, number of needed entries
  61.  
  62. * tags for xadGetInfo, xadFileUnArc and xadDiskUnArc
  63. XAD_NOEXTERN        EQU    (TAG_USER+050) * do not use extern clients
  64. XAD_PASSWORD        EQU    (TAG_USER+051) * password when needed
  65. XAD_ENTRYNUMBER        EQU    (TAG_USER+052) * number of wanted entry
  66. XAD_PROGRESSHOOK    EQU    (TAG_USER+053) * the progress hook
  67. XAD_OVERWRITE        EQU    (TAG_USER+054) * overwrite file ?
  68. XAD_MAKEDIRECTORY    EQU    (TAG_USER+055) * create directory tree
  69. XAD_IGNOREGEOMETRY    EQU    (TAG_USER+056) * ignore drive geometry ?
  70. XAD_LOWCYLINDER        EQU    (TAG_USER+057) * lowest cylinder
  71. XAD_HIGHCYLINDER    EQU    (TAG_USER+058) * highest cylinder
  72.  
  73. * input tags for xadConvertDates, only one can be passed
  74. XAD_DATEUNIXUTC        EQU    (TAG_USER+070) * unix date variable
  75. XAD_DATEAMIGA        EQU    (TAG_USER+071) * amiga date variable
  76. XAD_DATEDATESTAMP    EQU    (TAG_USER+072) * struct DateStamp
  77. XAD_DATEXADDATE        EQU    (TAG_USER+073) * struct xadDate
  78. XAD_DATECLOCKDATA    EQU    (TAG_USER+074) * struct ClockData
  79. XAD_DATECURRENTTIME    EQU    (TAG_USER+075) * input is system time
  80.  
  81. * output tags, there can be specified multiple tags for one call
  82. XAD_GETDATEUNIXUTC    EQU    (TAG_USER+080) * unix date variable
  83. XAD_GETDATEAMIGA    EQU    (TAG_USER+081) * amiga date variable
  84. XAD_GETDATEDATESTAMP    EQU    (TAG_USER+082) * struct DateStamp
  85. XAD_GETDATEXADDATE    EQU    (TAG_USER+083) * struct xadDate
  86. XAD_GETDATECLOCKDATA    EQU    (TAG_USER+084) * struct ClockData
  87.  
  88. *************************************************************************
  89. *                                                *
  90. *    objects for xadAllocObjectA                           *
  91. *                                                *
  92. *************************************************************************
  93.  
  94. XADOBJ_ARCHIVEINFO    EQU    $0001 * struct xadArchiveInfo
  95. XADOBJ_FILEINFO        EQU    $0002 * struct xadFileInfo
  96. XADOBJ_DISKINFO        EQU    $0003 * struct xadDiskInfo
  97. XADOBJ_HOOKPARAM    EQU    $0004 * struct HookParam
  98. XADOBJ_DEVICEINFO    EQU    $0005 * struct xadDeviceInfo
  99. XADOBJ_PROGRESSINFO    EQU    $0006 * struct xadProgressInfo
  100.  
  101. *************************************************************************
  102. *                                                *
  103. *    hook related stuff                                *
  104. *                                                *
  105. *************************************************************************
  106.  
  107. XADHC_READ    EQU    1    * read data into buffer
  108. XADHC_WRITE    EQU    2    * write buffer data to file/memory
  109. XADHC_SEEK    EQU    3    * seek in file
  110. XADHC_INIT    EQU    4    * initialize the hook
  111. XADHC_FREE    EQU    5    * end up hook work, free stuff
  112. XADHC_ABORT    EQU    6    * an error occured, delete partial stuff
  113. XADHC_FULLSIZE    EQU    7    * complete input size is needed
  114.  
  115.     STRUCTURE xadHookParam,0
  116.       ULONG    xhp_Command
  117.     ULONG    xhp_CommandData
  118.     APTR    xhp_BufferPtr
  119.       LONG    xhp_BufferSize
  120.       LONG    xhp_DataPos    * current seek position
  121.       APTR    xhp_PrivatePtr
  122.  
  123. * xadHookAccess commands
  124. XADAC_READ        EQU    10    * get data
  125. XADAC_WRITE        EQU    11    * write data
  126. XADAC_COPY        EQU    12    * copy input to ouput
  127. XADAC_INPUTSEEK        EQU    13    * seek in input file
  128. XADAC_OUTPUTSEEK    EQU    14    * seek in output file
  129.  
  130. *************************************************************************
  131. *                                                *
  132. *    support structures                              *
  133. *                                                *
  134. *************************************************************************
  135.  
  136. * Own date structure to cover all possible dates in a human friendly
  137. * format. xadConvertDates may be used to convert between different date
  138. * structures and variables.
  139.     STRUCTURE xadDate,0
  140.       ULONG     xd_Micros    * values 0 to 999999
  141.       LONG      xd_Year         * values 1 to 2147483648
  142.       UBYTE     xd_Month    * values 1 to 12
  143.       UBYTE     xd_WeekDay    * values 1 to 7
  144.       UBYTE     xd_Day        * values 1 to 31
  145.       UBYTE     xd_Hour        * values 0 to 23
  146.       UBYTE     xd_Minute    * values 0 to 60
  147.       UBYTE     xd_Second    * values 0 to 60
  148.       LABEL     xadDate_SIZE
  149.  
  150. XADDAY_MONDAY        EQU    1    * monday is the first day and
  151. XADDAY_TUESDAY        EQU    2
  152. XADDAY_WEDNESDAY    EQU    3
  153. XADDAY_THURSDAY        EQU    4
  154. XADDAY_FRIDAY        EQU    5
  155. XADDAY_SATURDAY     EQU    6
  156. XADDAY_SUNDAY        EQU    7    * sunday the last day of a week
  157.  
  158.     STRUCTURE xadDeviceInfo,0    * for XAD_OUTDEVICE tag
  159.     APTR    xdi_DeviceName    * name of device
  160.     ULONG    xdi_Unit    * unit of device
  161.     APTR    xdi_DOSName    * instead of Device+Unit, dos name without ':'
  162.  
  163. *************************************************************************
  164. *                                                *
  165. *    information structures                              *
  166. *                                                *
  167. *************************************************************************
  168.  
  169.     STRUCTURE xadArchiveInfo,0
  170.       APTR    xai_Client      * pointer to unarchiving client
  171.     APTR    xai_PrivateClient * private client data
  172.     APTR    xai_Password      * password for crypted archives
  173.     ULONG    xai_Flags        * read only XADAIF_ flags
  174.     ULONG    xai_LowCyl       * lowest cylinder to unarchive
  175.     ULONG    xai_HighCyl      * highest cylinder to unarchive
  176.     ULONG    xai_InPos        * input position, read only
  177.     ULONG    xai_InSize       * input size, read only
  178.     ULONG    xai_OutPos       * output position, read only
  179.     ULONG    xai_OutSize      * output file size, read only
  180.     APTR    xai_FileInfo      * data pointer for file arcs
  181.     APTR    xai_DiskInfo      * data pointer for disk arcs
  182.     APTR    xai_CurFile      * data pointer for current file arc
  183.     APTR    xai_CurDisk      * data pointer for current disk arc
  184.  
  185. * This structure is nearly complete private to either xadmaster or its
  186. * clients. An application program may access for reading only xai_Client,
  187. * xai_Flags, xai_FileInfo and xai_DiskInfo. For xai_Flags only XADAIF_CRYPTED
  188. * is useful. All the other stuff is private and should not be accessed!
  189.  
  190.     BITDEF XADAI,CRYPTED,0        * archive entries are encrypted
  191.     BITDEF XADAI,FILECORRUPT,1    * file is corrupt, but valid entries are in the list
  192.     BITDEF XADAI,FILEARCHIVE,2    * unarchive file entry
  193.     BITDEF XADAI,DISKARCHIVE,3    * unarchive disk entry
  194.     BITDEF XADAI,OVERWRITE,4    * overwrite the file
  195.     BITDEF XADAI,MAKEDIRECTORY,5    * create directory when missing
  196.     BITDEF XADAI,IGNOREGEOMETRY,6    * ignore drive geometry
  197.  
  198.     STRUCTURE xadFileInfo,0
  199.     APTR    xfi_Next
  200.     ULONG    xfi_EntryNumber    * number of entry, starts with 1
  201.     APTR    xfi_EntryInfo      * additional archiver text
  202.     APTR    xfi_PrivateInfo    * client private, see XAD_OBJPRIVINFOSIZE
  203.     ULONG    xfi_Flags          * see XADFIF_xxx defines
  204.     APTR    xfi_FileName       * see XAD_OBJNAMESIZE tag
  205.     APTR    xfi_Comment        * see XAD_OBJCOMMENTSIZE tag
  206.     ULONG      xfi_Protection     * OS 3 bits (including multiuser)
  207.     ULONG    xfi_OwnerUID       *